#ifndef BRICK_H
#define BRICK_H
#include <SFML/Graphics.hpp>
#include "Ball.h"
#include <list>


class Level;

class properties
{
    public:
    properties(bool stone = false, bool explosive = false, bool moving = false, bool hitTwice = false, bool pin = false) : stone(stone), explosive(explosive), moving(moving), hitTwice(hitTwice), pin(pin) {}
    bool stone;
    bool explosive;
    bool moving;
    bool hitTwice;
    bool pin;
};

class Brick
{
    friend class Level;

    public:
        Brick(const sf::Sprite& sprite, properties props);
        void draw(sf::RenderWindow* Window);
        void update(Level* level);
        void onHit(Level* level, Ball* ball);

    private:
        bool destroyed;
        int value;
        sf::Sprite sprite;

        int w;
        int h;
        int x;
        bool dropsBonuses;
        float getX();
        float getY();
        void explode(Level* level);
        void incrementTotalBricksShattered();

        properties props;

};

#endif // BRICK_H
